<?php declare(strict_types=1);
namespace app\exception;

use app\library\AppCode;
use Throwable;

class Success extends ApiBase {

    protected $data = [];

    public function __construct($data= [] ,$message = "request success", $code = AppCode::REQUEST_SUCCESS, Throwable $previous = null)
    {
        $this->setData($data);

        parent::__construct($message, $code, $previous);
    }

    public function setData($data){
        $this->data  = $data;
    }

    public function getData(){
        return $this->data;
    }
}
